package com.hefu.virtuallife.utils;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import com.hefu.virtuallife.App;
import com.hefu.virtuallife.R;
import com.hefu.virtuallife.ui.BgActivity;
import com.hefu.virtuallife.ui.SmartHomeActivity;
import com.hefu.virtuallife.ui.foods.DeliciousFoodActivity;
import com.hefu.virtuallife.ui.hotel.HotelIndexActivity;
import com.hefu.virtuallife.ui.map.TakeTaxiActivity;
import com.hefu.virtuallife.ui.map.TaxiMsgsActivity;
import com.hefu.virtuallife.ui.map.history.TaxiHistoryActivity;
import com.hefu.virtuallife.ui.purchase.HomePurchaseActivity;
import com.hefu.virtuallife.ui.ticket.AutoBookingActivity;

/**
 * Created by zc on 2018/7/4.
 */

public class GoWhere {
    public static void go(String str) {
        Intent intent = null;
        if (TextUtils.isEmpty(str)) {
            return;
        }

        switch (str) {
            case "打车":
                intent = new Intent(App.getContext(), TakeTaxiActivity.class);
                break;
            case "美食":
                intent = new Intent(App.getContext(), DeliciousFoodActivity.class);
                intent.putExtra("bg", R.drawable.ms_bg);
                break;
            case "机票/车票":
                intent = new Intent(App.getContext(), AutoBookingActivity.class);
                intent.putExtra("bg", R.drawable.cp_bg);
                break;
            case "酒店":
                intent = new Intent(App.getContext(), HotelIndexActivity.class);
                intent.putExtra("bg", R.drawable.jd_bg);
                break;
            case "家庭采购":
                intent = new Intent(App.getContext(), HomePurchaseActivity.class);
                intent.putExtra("bg", R.drawable.jtgw_bg);
                break;
            case "智能家居":
                intent = new Intent(App.getContext(), SmartHomeActivity.class);
                break;
            case "AI虚拟连卡佛商城":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.sc_bg);
                break;
            case "AI奢侈品专属设计":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.scp_bg);
                break;
            case "AI购物指南":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.gw_bg);
                break;
            case "AI招商":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.zs_bg);
                break;
            case "AI支付":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.zf_bg);
                break;
            case "危险环境生存评估":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.hj_bg);
                break;
            case "小区监控":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.xqjk_bg);
                break;
            case "门禁管理":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.mj_bg);
                break;
            case "楼宇安防":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.af_bg);
                break;
            case "访客识别":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.fk_bg);
                break;
            case "AI虚拟陆战侦查兵":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "AI军事分析":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "AI战场情景指挥":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "军事常识":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "AI虚拟飞行员":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "荷福名医":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.my_bg);
                break;
            case "物料集中采购":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "装配工厂管理":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "建筑设计":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "施工安全员":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            case "现场技术员":
                intent = new Intent(App.getContext(), BgActivity.class);
                intent.putExtra("bg", R.drawable.dd_bg);
                break;
            default:
                break;
        }

        if (null != intent) {
            intent.putExtra("title", str);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            App.getContext().startActivity(intent);
        }
    }

    public static void toTaxiMsg(Context context) {
        Intent intent = new Intent(context, TaxiMsgsActivity.class);
        context.startActivity(intent);
    }

    public static void toTaxiHistory(Context context) {
        Intent intent = new Intent(context, TaxiHistoryActivity.class);
        context.startActivity(intent);
    }


}
